<template>
  <div>
    <h1>【aty-tree】 component demo</h1>
    <p> 【aty-tree】 本质</p>
    <aty-row class="fd-tree-box">
      <aty-select-tree v-model="laayxzxwzl"
                       multiple
                       required
                       lazy-load
                       :request-data-method="getXzxwAy"
                       auto-request-data />
    </aty-row>
  </div>
</template>

<script>
export default {
  data () {
    return {
      laayxzxwzl: []
    }
  },
  watch: {

  },
  methods: {
    getXzxwAy (id, callback) {
      Artery.ajax.get('/zsd/api/v1/ays?id=0001&ywlx=0405&lazy=n').then(result => {
        callback(result)
      }).catch(err => {
        console.error(`加载案由失败，err:${err}`)
      })
    }
  },
  created () {
  },
  mounted () {
  }
}
</script>
<style  lang="less" type="text/less"  >
.fd-tree-box {
  margin: 20px;
  text-align: left;
  > .aty-row {
    margin-bottom: 20px;
  }
}
</style>
